import java.util.Scanner;

public class Main1 {
    public static double func(int n){
        if(n>1&&n%2==0){
            return func(n-1)-1.0/(n*(n+1));
        }else if(n>1&&n%2!=0){
            return func(n-1)+1.0/(n*(n+1));
        }else {
            return 1.0/2;
        }
    }
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        int n= sc.nextInt();
        System.out.printf("%.6f",func(n));
    }
}
